package Month07.day28.test4;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class main {
    public static void main(String[] args) {
        ArrayList<String> ManList = new ArrayList<>();
        ManList.add("周润发");
        ManList.add("成龙");
        ManList.add("刘德华");
        ManList.add("吴京");
        ManList.add("周星驰");
        ManList.add("李连杰");
        ArrayList<String> WomanList = new ArrayList<>();
        WomanList.add("林心如");
        WomanList.add("张曼玉");
        WomanList.add("林青霞");
        WomanList.add("柳岩");
        WomanList.add("林志玲");
        WomanList.add("王祖贤");
        Stream<String> stream = ManList.stream().filter(s -> s.length() == 3);
        Stream<String> stream1 = WomanList.stream().skip(1).filter(s -> s.startsWith("林"));
        List<String> collect = Stream.concat(stream, stream1).collect(Collectors.toList());
//        System.out.println(list);
//        System.out.println(list1);
//        System.out.println(collect);
        g(collect);
    }
    private static void g(List<String> collect){
        for (String s : collect) {
            System.out.println(s);
        }
    }
}
